Component({
  properties: {

  },

  data: {
    auctionPitch: 0,
    auction_title: ["最新上拍", "即将结拍"],
  },
  attached() {
    this.auctionData(this.data.auctionPitch)
  },
  methods: {
    lookAuction(e) {
      var index = e.currentTarget.dataset.index
      this.setData({
        auctionPitch: index
      })
      this.auctionData(index)
    },
    auctionData(e) {
      var _this = this
      getApp().request({
        url: getApp().api.auction.auctiongoods,
        method: "GET",
        data: {
          status: e
        },
        success(res) {

          _this.setData({
            auction_list: res.data.auction_list
          })
        }
      })
    },
    clickskip(e) {
      var id = e.currentTarget.dataset.id
      wx.navigateTo({
        url: '/auction/details/index?id=' + id,
      })
    }
  }
})